package by.home;

import java.util.ArrayList;
public class Main {

    public static void main(String[] args) {
        Stack stack = new Stack();
        for (int i = 1; i < 10; i++) {
            stack.push(String.valueOf(i));
        }
        System.out.print(stack);
        ArrayList tempArrayList = stack.toArray();
        for (Object tempElement:tempArrayList){
           String stringTempElement = (String)tempElement;
            System.out.println(tempElement.toString());
        }
    }
}
